package com.donkey.sms;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 中信通短信
 */
public class ZhongWangXin {

    public static void main(String[] args) {
        send();
    }

    // 单条发送地址
    static final String SEND1URL = "http://sms.fzzwx.com.cn:82/wgws/OrderServlet";
    // 多条发送地址
    static final String SENDNURL = "http://sms.fzzwx.com.cn:82/wgws/BatchSubmit";
    static final String apName = "app.cloopen.com";
    static final String apPassword = "8883";

    static String calledNumber = "18905950389";
    static String content = "66666";
    static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");

    static void send() {
        // 初始化SDK
        Map param = new HashMap();
        param.put("apName", apName);
        param.put("apPassword", apPassword);
        param.put("calledNumber", calledNumber);
        param.put("content", content);
        param.put("sendTime", sdf.format(new Date()));

        // 获取发送参数
        String result = "http.post(SEND1URL, null, param)";

        System.out.println(result);
    }
}
